GtkApplicationMenuButton: add docs
authorMatthias Clasen <mclasen@redhat.com>
Thu, 1 Dec 2011 13:33:08 +0000 (08:33 -0500)
committerRyan Lortie <desrt@desrt.ca>
Mon, 19 Dec 2011 17:51:09 +0000 (12:51 -0500)
gtk/gtkapplicationmenubutton.c

index cdfdbfd04f5e076dfa2694640e39ce067e71de2e..2ce75d00e647ff537ff07c837c9116daaae1947f 100644 (file)
 
 #include <string.h>
 
+/**
+ * SECTION:gtkapplicationmenubutton
+ * @title: GtkApplicationMenuButton
+ * @short_description: A button that shows the application menu
+ *
+ * A GtkApplicationMenuButton can be added to a #GtkApplicationWindow
+ * as an alternative way to present the application menu, if it is
+ * not shown by the desktop environment. GtkApplicationMenuButton
+ * automatically hides itself, and only appears when necessary. It
+ * is derived from #GtkButton, and you should use regular #GtkButton
+ * API to add a suitable icon or label. Note that #GtkApplicationWindow
+ * already provides a way to present the application menu, so a
+ * #GtkApplicationMenuButton is only needed if the default
+ * appearance (as part of a menubar) is not suitable.
+ *
+ * To configure the contents of the application menu, use
+ * g_application_set_menu() and g_application_set_action_group() on
+ * the #GtkApplication associated with the #GtkApplicationWindow.
+ */
+
 struct _GtkApplicationMenuButton
 {
   GtkButton parent_instance;
@@ -202,6 +222,15 @@ gtk_application_menu_button_class_init (GtkApplicationMenuButtonClass *class)
   object_class->finalize = gtk_application_menu_button_finalize;
 }
 
+/**
+ * gtk_application_menu_button_new:
+ *
+ * Creates a new #GtkApplicationMenuButton.
+ *
+ * Returns: a newly created #GtkApplicationMenuButton
+ *
+ * Since: 3.4
+ */
 GtkWidget *
 gtk_application_menu_button_new (void)
 {